// 获取已有的SPU接口返回的数据ts类型
export interface SpuResponeData {
  records: Records[];
  total: number;
  size: number;
  current: number;
  searchCount: boolean;
  pages: number;
}
export type Records= Record[]
export interface Record {
  id?: number | string;
  spuName: string;
  description: string;
  category3Id: number | string;
  tmId: number| string|undefined;
  spuSaleAttrList:null | SpuSpuTrademarkArr;
  spuImageList:ImageTypeArr;
}

// 照片墙每一张图片的ts类型
interface ImgListType {
  id?: number;
  spuId?: number;
  imgName: string;
  imgUrl: string;
}
// 多张照片的ts类型
export type ImageTypeArr = ImgListType[];



// SPU品牌的ts类型
export type SpuSpuTrademarkArr = SpuTrademarkList[]

export interface SpuTrademarkList {
  id: number;
  tmName: string;
  logoUrl: string;
}



//销售属性ts类型
export interface SpuAttr{
  id?:number,
  spuId:number,
  baseSaleAttrId:number,
  saleAttrName:string,
  spuSaleAttrValueList:spuSaleAttrValueList
}
export  interface salldeep {
  id: number;
  spuId: number;
  baseSaleAttrId: number;
  saleAttrValueName: string;
  saleAttrName: string;
  isChecked?: any;
}
export type spuSaleAttrValueList = salldeep[]

//获取某一个已有的SPU接口返回的数据
export type SaleArr = SpuAttr[];


// SPU销售属性的ts类型
export type  SpuBaseAttrList = SpuBaseAttr[]
// 代表销售属性
export interface SpuBaseAttr {
  id: number;
  name: string;
}





// SKU列表的ts类型
export interface SkuList {
  id: number;
  spuId: number;
  price: number;
  skuName: string;
  skuDesc: string;
  weight: string;
  tmId: number;
  category3Id: number;
  skuDefaultImg: string;
  isSale: number;
  createTime: string;
  skuImageList?: any;
  skuAttrValueList?: any;
  skuSaleAttrValueList?: any;
}
// 最外层SKU数据ts类型
export type SkuArr = SkuList[]